package com.student.Activitys.dialog;

import android.app.Activity;
import android.app.Dialog;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.student.Activitys.R;

/**
 * 项目名称：智慧校园学生端
 * 类描述：入党申请 查看 dialog
 * 创建人：张飞祥
 * 创建时间：2017/9/27 16:17
 * 修改人：张飞祥
 * 修改时间：2017/9/27 16:17
 * 修改备注：
 */
public abstract class PartyMySeeDialog extends Dialog implements View.OnClickListener {

    //退出按钮
    ImageView ivPartyMySeeExit;
    //标题
    TextView tvPartyMySeeTitle;
    //内容
    TextView tvPartyMySeeContent;


    private Activity activity;

    public PartyMySeeDialog(@NonNull Activity activity) {
        super(activity, R.style.HomeStageDialogTheme);
        this.activity = activity;
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        //初始化加载
        setContentView(R.layout.dialog_party_my_see);
        ivPartyMySeeExit = (ImageView) findViewById(R.id.iv_party_my_see_exit);
        tvPartyMySeeTitle = (TextView) findViewById(R.id.tv_party_my_see_title);
        tvPartyMySeeContent = (TextView) findViewById(R.id.tv_party_my_see_content);
        //给予外部控件调用
        setView(tvPartyMySeeTitle,tvPartyMySeeContent);
        //点击事件监听
        ivPartyMySeeExit.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.iv_party_my_see_exit:
                this.cancel();
                break;
        }
    }
    //外部控件调用方法
    public abstract void setView(TextView tvPartyMySeeTitle,TextView tvPartyMySeeContent);
}
